package com.brewdroid.model;

import com.brewdroid.enumerators.MaltFormat;

public class Malt implements Ingredient{
	private IngredientImpl ingredient;
	private int lovibond;
	private MaltFormat format;
	
	public Malt(String name, String description){
		ingredient = new IngredientImpl(name, description);
	}

	public Malt() {
		ingredient = new IngredientImpl();
	}

	public int getLovibond() {
		return lovibond;
	}
	public void setLovibond(int lovibond) {
		this.lovibond = lovibond;
	}
	public MaltFormat getFormat() {
		return format;
	}
	public void setFormat(MaltFormat format) {
		this.format = format;
	}

	@Override
	public String getName() {
		return ingredient.getName();
	}

	@Override
	public String getDescription() {
		return ingredient.getDescription();
	}

	@Override
	public void setName(String name) {
		ingredient.setName(name);
		
	}

	@Override
	public void setDescription(String description) {
		ingredient.setDescription(description);
	}
	
	@Override
	public String toString()
	{
		StringBuilder sb = new StringBuilder();
		sb.append("Name: "+ingredient.getName()+"\n");
		sb.append("Description: "+ingredient.getDescription() + "\n");
		sb.append("Lovibond: "+Integer.toString(lovibond)+"\n");
		sb.append("Format: "+ format.toString()+"\n");
		return sb.toString();

	}
	
}
